<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
	<head>
		<title>购物车</title>
		<script>
			//全选
			function checkAll(e)
			{
				var t=document.getElementsByName("chk");
				alert(t.length);
				for(var i=0;i<t.length;i++)
				{
					t[i].checked=document.getElementById("chkAll").checked;
				}
			}
		</script>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<!--edge浏览器H5兼容设置-->
		<meta name="renderer" content="webkit" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<!--导入核心文件-->
		<script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script>
		<!-------------Amazeui--------------->
		<script type="text/javascript" src="../js/amazeui.js"></script>
		<link rel="stylesheet" type="text/css" href="/css/amazeui.css"/>
		<!--全选样式-->
		<link rel="stylesheet" type="text/css" href="../css/amazeui.css">
		<!------------核心样式-------------->
		<link rel="stylesheet" type="text/css" href="../css/user.css">
		<script src="../bootstrap3/js/holder.js"></script>
		<link href="../bootstrap3/css/bootstrap.css" rel="stylesheet" type="text/css">
		<script src="../bootstrap3/jquery-1.9.1.min.js"></script>
		<script src="../bootstrap3/js/bootstrap.js"></script>
		<link rel="stylesheet" type="text/css" href="/css/style.css"/>
		<!-- 字体图标 -->
		<link rel="stylesheet" href="../bootstrap3/font-awesome-4.7.0/css/font-awesome.css" />
		<link rel="stylesheet" type="text/css" href="../css/cart.css" />
		<script src="../js/cart.js" type="text/javascript" charset="utf-8"></script>
		<!-------------jquery库-------------->
		<script type="text/javascript" src="/js/jquery-1.8.3.min.js"></script>
		<!--定制网站图标-->
		<link rel="shortcut icon" href="favicon.ico">
	</head>

	<body>
	<!-------------------版头------------------->
	<div th:replace="header-c"></div>
		<div class="container">
			<div class="col-md-offset-1 col-md-10">
				<div class="panel panel-primary">
					<div class="panel-heading">
						<p class="panel-title"><span class="fa fa-shopping-cart"></span> 购物车</p>
					</div>
					<div class="panel-body">
						<form action="orderConfirm.html" role="form">
							<!--购物车表格开始-->
							<table class="cart-table" width="150%">
								<thead>
									<tr>
										<th width="8%">
											<input type="checkbox" class="ckall" onclick="checkall(this)" />全选</th>
										<th width="110"></th>
										<th width="29%">商品</th>
										<th width="11%">单价</th>
										<th width="15%">数量</th>
										<th width="11%">金额</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody id="cart-list" class="cart-body">
									<tr>
										<td>
											<input type="checkbox" class="ckitem" />
										</td>
										<td><img src="../images/t2.jpg" class="img-responsive" /></td>
										<td>孟津特供香酥梨一斤</td>
										<td>¥<span id="goodsPrice1">58</span></td>
										<td>
											<input type="button" value="-" class="num-btn" onclick="reduceNum(1)" />
											<input id="goodsCount1" type="text" size="2" readonly="readonly" class="num-text" value="1">
											<input class="num-btn" type="button" value="+" onclick="addNum(1)" />
										</td>
										<td><span id="goodsCast1"></span></td>
										<td>
											<input type="button" onclick="delCartItem(this)" class="cart-del btn btn-default btn-xs" value="删除" />
										</td>
									</tr>
									<tr>
										<td>
											<input type="checkbox" class="ckitem" />
										</td>
										<td><img src="../images/t3.jpg" class="img-responsive" /></td>
										<td>孟津特供奶葡萄三斤</td>
										<td>¥<span id="goodsPrice2">49</span></td>
										<td>
											<input type="button" value="-" class="num-btn" onclick="reduceNum(2)" />
											<input id="goodsCount2" type="text" size="2" readonly="readonly" class="num-text" value="1">
											<input class="num-btn" type="button" value="+" onclick="addNum(2)" />
										</td>
										<td><span id="goodsCast2"></span></td>
										<td>
											<input type="button" onclick="delCartItem(this)" class="cart-del btn btn-default btn-xs" value="删除" />
										</td>
									</tr>
									<tr>
										<td>
											<input type="checkbox" class="ckitem" />
										</td>
										<td><img src="../images/t2.jpg" class="img-responsive" /></td>
										<td>孟津特供香酥梨一斤</td>
										<td>¥<span id="goodsPrice3">58</span></td>
										<td>
											<input type="button" value="-" class="num-btn" onclick="reduceNum(3)" />
											<input id="goodsCount3" type="text" size="2" readonly="readonly" class="num-text" value="1">
											<input class="num-btn" type="button" value="+" onclick="addNum(3)" />
										</td>
										<td><span id="goodsCast3"></span></td>
										<td>
											<input type="button" onclick="delCartItem(this)" class="cart-del btn btn-default btn-xs" value="删除" />
										</td>
									</tr>
								</tbody>
							</table>
							<div class="total-bar">
								<a href="javascript:selDelCart()" class="cart-del-sel btn btn-default btn-xs">删除所选商品</a>
								<span class="pull-right">已选商品
								<span id="selectCount">0</span>件 总价¥
								<span id="selectTotal">0</span>元
								</span>
							</div>
							<div>
								<span class="pull-right">
								<!--<input type="submit" th:href="@{/confirm_order}" value="  结  算  " class="btn btn-primary btn-lg link-account" />-->
									<!--<a th:value="@{/confirm_order}">提交订单</a>-->
									<a th:href="@{/confirm_order}" >提交订单</a>
							</span>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	<!-----------------版底---------------->
	<div th:replace="footer"></div>
	</body>
</html>